#include <iostream>
#include <string>
// 包含SpireMS SDK头文件
#include <sms_core.h>


using namespace std;


void callback(nlohmann::json msg)
{
    std::cout << "params_changed: " << msg << std::endl;
}


int main(int argc, char *argv[])
{
    sms::Parameter param("TestName", callback);

    nlohmann::json input_params;
    input_params["key1"] = "val1";
    input_params["key2"] = 20.1;
    param.set_params(input_params);
    std::cout << "key1: " << param.get_param("key1") << std::endl;

    param.join();
    return 0;
}

